<template>
<el-menu class="el-menu-demo" mode="horizontal" background-color="#fff" text-color="black" active-text-color="black">
    <el-submenu index="2" class="submenu">
        <template slot="title">欢迎您：{{ userName }}</template>
        <el-menu-item @click="exit()" index="2-3">退出</el-menu-item>
    </el-submenu>
</el-menu>
</template>

<script>
export default {
    name: "navcon",
    data() {
        return {
            userName: "张三",
        };
    },
    created() {},
    methods: {},
};
</script>

<style scoped></style>
